<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
</head>
<body>
<input type="text" id="firstNum" name="firstNum"><br>
<input type="text" id="nextNum" name="nextNum"><br>
<input type="button" id="jia" name="jia" value="+" onclick="jisuan('jisuan_jia')"><br>
<input type="button" id="jian" name="jian" value="-" onclick="jisuan('jisuan_jian')"><br>
<input type="button" id="cheng" name="cheng" value="*" onclick="jisuan('jisuan_cheng')"><br>
<input type="button" id="chu" name="chu" value="/" onclick="jisuan('jisuan_chu')"><br>
<input type="text" id="result" name="result" readonly="readonly">
</body>
<script>
    function jisuan(obj) {
        $.ajax({
            url:obj,
            type:"POST",
            data:{firstNum:$("#firstNum").val(),nextNum:$("#nextNum").val()},
            success:function (data) {
                $("#result").val(data);
            }
        })
    }
</script>
</html>